//screen.js 
function screenUtil() {
  var screenSize = {};
  //获取屏幕宽高 
  wx.getSystemInfo({
    success: function (res) {
      screenSize.windowWidth = parseInt(res.windowWidth)*2;
      screenSize.windowHeight = parseInt(res.windowHeight)*2;
      screenSize.windowScale = res.windowHeight / res.windowWidth; //屏幕高宽比 
      console.log('windowWidth: ' + screenSize.windowWidth)
      console.log('windowHeight: ' + screenSize.windowHeight)
      console.log('宽高比: ' + screenSize.windowScale)
    }
  })
  return screenSize;
}

module.exports = {
  screenUtil: screenUtil,
}